// ==== template/英雄 【Hero】 ====


// ------------------------------------------------------------------------------------------------------
library HeroLib 
    struct Hero extends array 
        static integer size = 0 
        // 名字 string
        string name
        // 是否无敌 boolean
        boolean isIvn
        // 生命值 real
        real maxhp
        // 头像 path
        string art
        // 死亡动作 func
        integer deathAction
        // AI系统 type
        integer aiType

        integer index
        integer instanceId
        static method newFromSheet takes integer index, integer instanceId returns thistype 
            call SaveInteger(VJASSGO_XLSX_DATA_HT, thistype.typeid, instanceId, integer(Hero[index])) 
            set Hero[index].instanceId = instanceId
            set Hero[index].index = index 
            set thistype.size = index
            return Hero[index] 
        endmethod 
        static method get takes integer instanceId returns thistype 
            return LoadInteger(VJASSGO_XLSX_DATA_HT, thistype.typeid, instanceId) 
        endmethod 
    endstruct 
endlibrary
// ------------------------------------------------------------------------------------------------------




